package com.cpi.cornpp.plantinitialcost.view;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.cpi.cornpp.corntypes.view.CornTypesView;
import com.cpi.cornpp.plants.view.PlantView;

public class PlantInitialCostGroupView implements Serializable {
	private static final long serialVersionUID = -6707771112015989184L;
	private int versionId;
	private PlantView plantView;
	private CornTypesView cornTypesView;
	private List plantInitialCostViews;
	private boolean lastCornType;
	private String unloadAmount;
	public PlantInitialCostGroupView() {
		plantInitialCostViews = new ArrayList();
	}
	public int getVersionId() {
		return versionId;
	}
	public void setVersionId(int versionId) {
		this.versionId = versionId;
	}
	public PlantView getPlantView() {
		return plantView;
	}
	public void setPlantView(PlantView plantView) {
		this.plantView = plantView;
	}
	public CornTypesView getCornTypesView() {
		return cornTypesView;
	}
	public void setCornTypesView(CornTypesView cornTypesView) {
		this.cornTypesView = cornTypesView;
	}
	public List getPlantInitialCostViews() {
		return plantInitialCostViews;
	}
	public void setPlantInitialCostViews(List plantInitialCostViews) {
		this.plantInitialCostViews = plantInitialCostViews;
	}
	public void setLastCornType(boolean lastCornType) {
		this.lastCornType = lastCornType;
	}
	public void setUnloadAmount(String unloadAmount) {
		this.unloadAmount = unloadAmount;
	}
	public String getUnloadAmount() {
		return unloadAmount;
	}
	public boolean isLastCornType() {
		return lastCornType;
	}
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object obj) {
		boolean isEqual = false;
		PlantInitialCostGroupView plantInicialCostGroupView = null;
		if( obj != null ){
			if( obj instanceof PlantInitialCostGroupView){
				plantInicialCostGroupView = (PlantInitialCostGroupView)obj;
				isEqual = 	plantInicialCostGroupView.getVersionId() == this.getVersionId() &&
								plantInicialCostGroupView.getPlantView().equals(this.getPlantView()) &&
								plantInicialCostGroupView.getCornTypesView().equals(this.getCornTypesView());
			}
		}
		return isEqual;
	}
}